﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace BLL
{
    public class PhongBLL : DAL.PhongDAL
    {

        private string AddID(string id)
        {
            string s = id.Trim(); // bn01

            int len = s.Length;
            string con = s.Substring(2); // 01
            string kq = s.Substring(0, 2); // bn
            int so = Convert.ToInt32(con) + 1;
            if (so <= 9)
                kq += '0';
            kq += so;

            return kq;
        }


        public string CreateID(string a)
        {
            string result = Select_max(a).Trim();
            
            Int32 i = 0;
            i = Convert.ToInt32(result);
            i++;


            return "" + i.ToString();

        }


    }
}
